package tech.aistar.corejava.day17.homework;

import java.util.Date;

/**
 * @Author: lya
 * @Description: 本类的作用描述:
 * @CreateDate: 2019/8/6
 * @Version: 1.0
 */
public class Employ {
    private String empId;
    private String empName;
    private Date empBir;
    private String empJob;

    public Employ(String empId, String tom, String s, String 技术) {
    }

    public Employ(String empId, String empName, Date empBir, String empJob) {
        this.empId = empId;
        this.empName = empName;
        this.empBir = empBir;
        this.empJob = empJob;
    }

    public String getEmpId() {
        return empId;
    }

    public void setEmpId(String empId) {
        this.empId = empId;
    }

    public String getEmpName() {
        return empName;
    }

    public void setEmpName(String empName) {
        this.empName = empName;
    }

    public Date getEmpBir() {
        return empBir;
    }

    public void setEmpBir(Date empBir) {
        this.empBir = empBir;
    }

    public String getEmpJob() {
        return empJob;
    }

    public void setEmpJob(String empJob) {
        this.empJob = empJob;
    }

    @Override
    public String toString() {
        final StringBuilder sb = new StringBuilder("Employ{");
        sb.append("empld='").append(empId).append('\'');
        sb.append(", empName='").append(empName).append('\'');
        sb.append(", empBir=").append(empBir);
        sb.append(", empJob='").append(empJob).append('\'');
        sb.append('}');
        return sb.toString();
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        Employ employ = (Employ) o;

        return empId != null ? empId.equals(employ.empId) : employ.empId == null;
    }

    @Override
    public int hashCode() {
        return empId != null ? empId.hashCode() : 0;
    }
}
